home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / h / aparse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  2.8 KB  |  97 lines

  1. /* aparse.h: holdall structure for various parsing entities for one address */
  2.  
  3. /*
  4.  * @(#) $Header: /xtel/pp/pp-beta/h/RCS/aparse.h,v 6.0 1991/12/18 20:42:44 jpo Rel $
  5.  *
  6.  * $Log: aparse.h,v $
  7.  * Revision 6.0  1991/12/18  20:42:44  jpo
  8.  * Release 6.0
  9.  *
  10.  *
  11.  */
  12.  
  13. #ifndef _H_APARSE
  14. #define _H_APARSE
  15.  
  16. #include "ap.h"
  17. #include "or.h"
  18. #include "chan.h"
  19. #include "auth.h"
  20. #include "list_rchan.h"
  21.  
  22. typedef struct  _bindings {
  23.         LIST_RCHAN      *outchan;
  24.         LIST_RCHAN      *fmtchans;
  25.         LIST_BPT        *bpts;
  26.         int             cost;
  27.         struct _bindings        *next;
  28. } Bindings;
  29.  
  30. typedef struct _aliasList {
  31.     char    *alias;
  32.     struct _aliasList    *next;
  33. } aliasList;
  34.  
  35. typedef struct a_parse {
  36.  
  37.     int    ad_type;
  38.  
  39. /*-- rfc 822 entities --*/
  40.  
  41.     AP_ptr    ap_tree,     /* complete tree  */
  42.         ap_group,    /* start of 822 group */
  43.         ap_name,    /* start of 822 name */
  44.         ap_local,    /* start of 822 local */
  45.         ap_domain,    /* start of 822 domain */
  46.         ap_route;    /* start of 822 route */
  47.  
  48.     int    normalised;    /* degree of normalisation done */
  49. #define    APARSE_NORM_NONE    0 
  50. #define APARSE_NORM_NEXTHOP    1
  51. #define APARSE_NORM_ALL        2
  52.  
  53.     int    dmnorder;    /* order required for domain ordering */
  54.     int    full;        /* boolean indicating whether to parse fully */
  55.     int    percents;    /* boolean indicating whether percents */
  56.                 /* are recognised as having routing properties */
  57.  
  58.     char    *r822_str,    /* string representation of address */
  59.         *r822_local,    /* string representation of local part of address */
  60.         *r822_error;    /* error message from 822 parse and validate */
  61. /*-- x400 entities --*/
  62.     ORName    *orname;    /* OR tree and DN representation of x400 address */
  63.     OR_ptr    lastMatch;    /* where we matched to in or table */
  64.     char    *x400_dn,    /* string representation of DN */
  65.         *x400_str,    /* string representation of ORaddress */
  66.         *x400_local,    /* string representation of local part of ORaddress */
  67.         *x400_error;    /* error message from x400 parse and validate */
  68. /*-- authorisation related entities --*/
  69.  
  70.     AUTH    *auth;
  71.  
  72. /*-- delivery related entities --*/
  73.     aliasList    *aliases;    /* list of aliases unwound so far */
  74.     char    *local_hub_name;    /* name of local hub */
  75.     int    recurse_count;        /* number of times have recursed */
  76.     int    dont_use_aliases;    /* whether to use aliases table or not */
  77.                     /* set after an external entry */
  78.     int    internal;        /* used in header address normalisation */
  79.                     /* to specify whether to follow external entries */
  80.                        
  81.     Bindings    *channels;    /* all possible channels that can */
  82.                     /* be used to delivery to the address */
  83. } Aparse, *Aparse_ptr;
  84.  
  85. extern Aparse_ptr     aparse_new();
  86. extern void        aparse_rewindr822();
  87. extern void        aparse_rewindx400();
  88. extern void        aparse_rewindlocal();
  89. extern void        aparse_free();
  90. extern void        aparse_copy_for_recursion();
  91.  
  92. extern void        aparse_addToAliasList();
  93. extern int        aparse_inAliasList();
  94. extern void        aparse_freeAliasList();
  95. extern aliasList    *aparse_aliasDup();
  96. #endif
  97.